home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Prograph Reference Manual / Prograph Reference 1-4 / Prograph Reference 1-4.rsrc / TEXT_140.txt < prev    next >
Encoding:
Text File  |  1995-10-21  |  14.9 KB  |  395 lines

  1.  
  2. The Tools Menu*42*
  3.  
  4. This menu is used for locating operations by name in Case windows, for locating strings in Text windows, and for replacing the names of operations and replacing strings. It is also used for making methods compact or execute-only.
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. Find…*43*
  16.  
  17. Opens the following dialog, in which various search criteria can be set:
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. Find, Replace*43*
  32.  
  33. These editable text fields display the search and replacement strings respectively.
  34.  
  35. Cancel and Retain Buttons*43*
  36.  
  37. Clicking either of these buttons dismisses the dialog without performing a search. However, Retain saves changes made in the search criteria, while Cancel does not.
  38.  
  39. Find Button*43*
  40.  
  41. Clicking this button dismisses the dialog and starts a search for an item that satisfies the search criteria. If such an item is found, the window containing it is opened with the item selected. Otherwise a warning beep sounds and an appropriate message is generated.
  42.  
  43. By checking boxes in the dialog the user can:*44*
  44.  
  45. o    define the scope of search
  46.  
  47. o    specify criteria for string matching
  48.  
  49. o    modify the display of windows during search
  50.  
  51. The check boxes that determine the scope of search are as follows:*44*
  52.  
  53. Simple/Primitive, Local/Evaluate, Constant/Match, Persistent, Instance, Get/Set, Macintosh*44*
  54.  
  55. These specify the kinds of operations that are acceptable targets for the search.
  56.  
  57. Text Attribute*44*
  58.  
  59. If this box is checked, all attributes of type String in all existing instances are investigated for matching strings. Also, when this box is checked, the following boxes are gray and unchecked: Simple/Primitive, Local/Evaluate, Constant/Match, Persistent, Instance, Get/Set, Macintosh, Match Arity, Current Method Only, Current Class Only, and Close Windows.
  60.  
  61. Text Window*44*
  62.  
  63. If this box is checked, Text windows are investigated for matching strings. Also, when this box is checked, all boxes that relate to searching for operations are gray and unchecked, namely Simple/Primitive, Local/Evaluate, Constant/Match, Persistent, Instance, Get/Set, Macintosh, Match Arity, Current Method Only, and Current Class Only.
  64.  
  65. Ignore Upper/Lower*44*
  66.  
  67. If this box is checked, matching does not distinguish between lower and upper case. Otherwise, matching is case sensitive.
  68.  
  69. Match Pattern*44*
  70.  
  71. If this box is checked, the search and Set strings are treated as patterns, in which occurrences of the asterisk (*) and question mark (?) characters have special status. A string matches the match pattern if the pattern can be made identical to it by substituting a string for each asterisk and a single character for each question mark. 
  72.  
  73. The string substituted for a string or question mark is called its match value. If there is more than one set of substitute strings that satisfy these conditions, the set chosen is the one that minimizes the lengths of substitute strings for occurrences of the asterisk, starting from the left of the match pattern.
  74.  
  75. In searching for operations, a match succeeds only if the search pattern matches the entire name of an operation. In searching for text attributes, a match succeeds only if the search pattern matches the entire value of an attribute. In searching Text windows, however, matching succeeds if any substring of the window contents matches the search pattern.*45*
  76.  
  77. Match Arity*45*
  78.  
  79. This box is available (that is, is not gray) only if the Find field has not been edited since the last time that the Set Selection menu item was applied to a selected operation or method. 
  80.  
  81. When this box is checked, the search for operations is restricted to those with arity that matches that of the operation or method to which Set Selection was applied. 
  82.  
  83. Current Method Only *45*
  84.  
  85. If the front window is a Methods window with a single selected method or a Case window of a method, then search is restricted to operations occurring in cases of this method.  
  86.  
  87.  
  88. Current Class Only *45*
  89.  
  90. If the front window is a Classes window with a single selected class or a Methods window of a class, then search is restricted to operations occurring in all methods of this class.  
  91.  
  92. Close Windows*45*
  93.  
  94. If this box is checked, then selecting the menu item Find Again closes the last window opened by searching, provided that it is still the top window and does not contain the next item found.
  95.  
  96. Set Selection*45*
  97.  
  98. This item is available if the top window is a Text window or an edit window with a single selected element, and it sets the search criteria accordingly.
  99.  
  100. If the top window is a Text window, the search string is set to the selected string in the window, the Text Window box is checked, and the Match Pattern box is unchecked.
  101.  
  102. If the top window is an edit window, the search string is set to a pattern matching the name of the selected element, and other search criteria are set depending on the selected element. For example, if a Set Selection is chosen when the front window is Persistents and has a single selected persistent called ‚Äúsales,‚Äù then Find‚Ķ displays the following:*45*
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. Find Again*46*
  118.  
  119. Finds the next operation or string in the scope of the search.
  120.  
  121. Replace*46*
  122.  
  123. If the top window contains a single selected operation, text attribute, or a selected string satisfying the search criteria, it is replaced according to the Set pattern. 
  124.  
  125. If the box Match Pattern is not checked, the name of the selected operation or the selected string is replaced by the Set string. Otherwise, it is replaced by a string constructed by substituting every question mark and asterisk in the Set pattern, starting from the left, with the match value of the corresponding question mark or asterisk in the match pattern. Leftover occurrences of asterisk or question mark at the right of the Set pattern are replaced by the empty string. 
  126.  
  127. Replace All*46*
  128.  
  129. Replaces the names of all operations or strings matching the search criteria. 
  130.  
  131. Compact*46*
  132.  
  133. Prograph Classic lets you compact methods: this removes all visual information from them, with the benefit that they take up much less RAM space. However, the Prograph document file on disk still retains that visual information, making it possible to uncompact methods. A third option, to make methods execute only, permanently removes the visual information. This may be desirable if you want to ship code with some methods protected from modification by the user. *47*
  134. __________________________________________________________
  135. TECHNICAL NOTE: When a Prograph method is compacted, all its visual information is stripped out and placed in a temporary storage area on disk, freeing up that portion of RAM. When you save your program, that information is saved in the resource fork of your document file. This allows loading in of methods from the file, with the visual information being loaded in only for uncompacted methods. It also permits uncompacting a method, since its visual information is still out there on disk.
  136. ---------------------------------------------------------
  137.  
  138. When one or more methods or classes have been selected, the Uncompact, Compact and Make Execute Only menu items in the Tools menu become active. *47*
  139. _________________________________________________________
  140. NOTE: To Compact, Uncompact or Make Execute Only methods in classes, the classes must be visible. Methods in hidden classes will not be affected by these menu items.
  141. ---------------------------------------------------------
  142.  
  143.  
  144.  
  145.  
  146. Choosing Compact causes the selected methods, or all the methods in the selected classes, to be compacted as described above. The icon for a Compact method has a reduced version of the little dataflow diagram that is on a regular method.*47*
  147.  
  148. When executed, compacted methods behave exactly the same as uncompacted methods. They can call, and be called by, uncompacted methods. However, when executing in Step or Trace mode, the code inside compact methods is not made visible. Compact methods can be made the main program method (using Set Program under the Exec menu), and all the normal editing operations (Cut Object, etc.) apply to them.*47*
  149.  
  150. Uncompact *48*
  151.  
  152. Selecting Uncompact from the Tools menu restores the selected methods or the methods in the selected classes to their uncompacted state.
  153.  
  154. Make Execute Only*48*
  155.  
  156. Selecting this menu item permanently removes all visual information from the selected Compact methods or from the Compact methods in the selected classes. The icon for an execute-only method is the same as that for a Compact method, with the addition of a little lock in the bottom left-hand corner.
  157. __________________________________________________________
  158. WARNING: Before you make a method execute-only, be sure you have a backup of it in uncompacted form, as you will not be able to edit it once it‚Äôs been made execute-only. 
  159. ---------------------------------------------------------
  160.  
  161. The Opers Menu*48*
  162.  
  163. Selected operations and methods are transformed by the items of this menu. The effects of annotating an operation are explained in ‚ÄúThe Case Window‚Äù section below in this chapter.
  164.  
  165. In the following, unless otherwise noted, a control associated with an operation is preserved in any transformation by items from this menu.*48*
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186. Simple *49*
  187.  
  188.      The operation becomes a Simple operation. 
  189.  
  190. Constant*49*
  191.  
  192.      The operation becomes a Constant operation. Any associated control is removed.
  193.  
  194. Match*49*
  195.  
  196.      The operation becomes a Match. If the operation has no control, the ‚ÄúNext Case on 
  197.           Failure‚Äù control is appended.
  198.  
  199. Persistent*49*
  200.  
  201.      The operation becomes a Persistent operation.
  202.  
  203. Instance*49*
  204.  
  205.      The operation becomes an Instance generator. 
  206.  
  207.      The Method in a class Methods window becomes an Initialization.
  208.  
  209. Get*50*
  210.  
  211.      The operation becomes a Get attribute.
  212.  
  213.      The Method in a class Methods window becomes a Get method.
  214.  
  215. Set*50*
  216.  
  217.      The operation becomes a Set attribute.
  218.  
  219.      The Method in a class Methods window becomes a Set method.
  220.  
  221. Local*50*
  222.  
  223.      The operation becomes a Local operation.
  224.  
  225. Evaluate*50*
  226.  
  227.      The operation becomes an Evaluation.
  228.  
  229. Mac Constant*50*
  230.  
  231.      The operation becomes a Mac Constant operation. Any associated control is 
  232.      removed.  
  233.  
  234. Mac Match*50*
  235.  
  236.      The operation becomes a Mac Match. If the operation has no control, ‚ÄúNext Case on 
  237.           Failure‚Äù is appended.
  238.  
  239. Mac Global*50*
  240.  
  241.      The operation becomes a Mac Global.
  242.  
  243. Mac Address*50*
  244.  
  245.      The operation becomes a Mac Address.
  246.  
  247. Mac Get Field*51*
  248.  
  249.      The operation becomes a Mac Get Field.  
  250.  
  251. Mac Set Field*51*
  252.  
  253.      The operation becomes a Mac Set Field.  
  254.  
  255. Opers to Local*51*
  256.  
  257.      Transforms the group of selected operations into a Local (see ‚ÄúThe Case Window‚Äù 
  258.      section below in this chapter for more details).
  259.  
  260. Local to Method‚Ķ*51*
  261.  
  262.      Transforms a single selected Local operation to a simple operation. The following 
  263.      dialog is opened displaying a suggested name for the simple operation. If the Local 
  264.      is in a universal method, this suggested name is simply the name of the Local; 
  265.      otherwise, it is the name of the Local preceded by //.
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Name*51*
  275.  
  276.      This is an editable-text field for the name of the operation. 
  277.  
  278. Cancel*51*
  279.  
  280.      If clicked, this closes the dialog without performing the conversion.
  281.  
  282. OK*51*
  283.  
  284.      When this button is clicked, if the name is not a data-determined reference, the 
  285.      Local is transformed into a simple operation and the corresponding new method is
  286.       created in the appropriate place. If the name is a data-determined reference, a 
  287.      second dialog is displayed over the first, with a scrolling list of names of classes. 
  288.      At most one class can be selected in this list. 
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298. Select*52*
  299.  
  300.      If a class is selected, clicking this button closes both dialogs, transforms the Local 
  301.      into a simple operation with the specified name, and creates a corresponding 
  302.      method in the selected class with cases identical to those of the original Local.  
  303.  
  304.      Double-clicking an item in the scroll list is equivalent to first selecting it and 
  305.      then clicking the Select button.
  306.  
  307. Cancel52*
  308.  
  309.      Clicking this button dismisses the topmost dialog without transforming the Local 
  310.      or creating a method.
  311.  
  312. In each of these situations, if the required new method cannot be created because its name would conflict with that of an existing method, the Local is not transformed, the first dialog remains open, a warning beep is sounded, and an appropriate message is generated.52*
  313.  
  314. The Controls Menu*53*
  315.  
  316. Prograph operations, roots, terminals, and the output bar are annotated by items on this menu. 
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. Operations*53*
  334.  
  335. Simple*53*
  336.  
  337. Transforms a root (or terminal) into a simple root (or terminal), and an operation into a simple operation. 
  338.  
  339. Simple removes all controls and control annotations from an operation. As a consequence, all its roots (or terminals) are transformed to simple roots (or terminals).
  340.  
  341. Super*53*
  342.  
  343. Transforms an operation into a Super operation, changing its name into the form //<name>.
  344.  
  345. Repeat*53*
  346.  
  347. Transforms an operation into a Repeat multiplex.
  348.  
  349. Terminals and Roots*54*
  350.  
  351. Inject*54*
  352.  
  353. Transforms a terminal into an Inject terminal. Note that Mac Methods cannot have Inject terminals.
  354. ________________________________________________________
  355. EDITING TIP:  To add a terminal to a Persistent with an existing Inject terminal:
  356.  
  357. u Create the first terminal.
  358.  
  359. u Annotate it as Inject.
  360.  
  361. u Drag the terminal to make the persistent operation wider.
  362.  
  363. u Click (or command-click) to create the second (data) terminal.
  364. -------------------------------------------------------
  365.  
  366. Partition*54*
  367.  
  368. Applied to a selected terminal of an operation with no roots, this item transforms the associated operation into a Partition multiplex, automatically adding True and False roots.
  369.  
  370. List*54*
  371.  
  372. Transforms a terminal (or root) into a List terminal (or root). As a consequence, the associated operation becomes a Repeat multiplex.
  373.  
  374. Loop*54*
  375.  
  376. Transforms a terminal (or root) into a Loop terminal (or root). Either a simple root (or terminal) on the associated operation is converted into the corresponding Loop root (or terminal), or a new corresponding Loop root (or terminal) is added to the operation. The associated operation becomes a Repeat multiplex.
  377.  
  378. Controls on Operations and on the Output Bar*54*
  379.  
  380. The Controls‚ÄîNext Case, Continue, Terminate, Finish and Fail‚Äîcan be applied to selected operations and to the output bar. The general rules for these controls are:
  381.  
  382. o    If an operation already has a control, and the control is changed by selecting the appropriate menu item, the activation condition ‚Äúon Success‚Äù or ‚Äúon Failure‚Äù of the original control is retained in the new one.
  383.  
  384. o    If the operation has no control, and a menu item is applied to add a control to it, the new control has the activation condition ‚Äúon Failure‚Äù.*54*
  385. Invert *55*
  386.  
  387.   ¬†
  388.  
  389.  
  390. Toggles the activation condition of the control on the operation. Note that applying this item to an operation with no control produces the control ‚ÄúContinue on Failure‚Äù (the default control for an operation, ‚ÄúContinue on Success‚Äù, does not have a control icon).    
  391.  
  392. Next Case, Continue, Terminate, Finish, Fail*55*
  393.  
  394. Appends a control to an operation. 
  395.